﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Student.Master" AutoEventWireup="true" CodeBehind="StudentSelStu.aspx.cs" Inherits="WebSystem.StudentSelStu" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <br />
    <asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl="~/StudentMain.aspx" Font-Size="Large" style="text-align: left; position: absolute; z-index: 1; left: 10px; top: 16px; right: 869px">首页</asp:HyperLink>
    <p style="text-align: center; position: relative">
        <br />
        <asp:Label ID="lblInsNO" runat="server" Text="输入学号："></asp:Label>
        &nbsp; &nbsp;&nbsp;
        <asp:TextBox ID="txtNo" runat="server"></asp:TextBox>
&nbsp;
    <asp:Button ID="Button1" runat="server" Text="显示信息" OnClick="Button1_Click" />
    </p>
    <p>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</p>
<p>
        &nbsp; &nbsp;<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="Sno" DataSourceID="SqlDataSource1">
            <Columns>
                <asp:BoundField DataField="Sno" HeaderText="学号" ReadOnly="True" SortExpression="Sno" />
                <asp:BoundField DataField="Sname" HeaderText="姓名" SortExpression="Sname" />
                <asp:BoundField DataField="Sex" HeaderText="性别" SortExpression="Sex" />
                <asp:BoundField DataField="Classno" HeaderText="班级" SortExpression="Classno" />
                <asp:BoundField DataField="Dno" HeaderText="系号" SortExpression="Dno" />
                <asp:BoundField DataField="Dept" HeaderText="系" SortExpression="Dept" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:dhd2014115121ConnectionString %>" SelectCommand="SELECT * FROM [Student] WHERE ([Sno] = @Sno)">
            <SelectParameters>
                <asp:ControlParameter ControlID="txtNo" Name="Sno" PropertyName="Text" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;
        &nbsp; &nbsp;</p>
    <p>
        &nbsp;</p>
</asp:Content>
